# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
for a in range(1,10):              ##生成一维数据行1~9
    for b in range(1,a+1):          ##生成一维数据行1~9
        print("{}*{}={:<5}".format(b,a,b*a),end='')
    print('')

print("="*90)

for j in range (9,0,-1):            ##生成一维数据列9~1
    for i in  range (1,j+1):        ##生成一维数据行1~9
        print("{}*{}={:<5}".format(i,j,i*j),end='')
    print('')
    
print("="*90)

for c in range (9,0,-1):            ##生成一维数据列9~1
    for d in range (9,c-1,-1):      ##生成一维数据行9~1
        print("{}*{}={:<5}".format(c,d,c*d),end='')
    print('')
    
print("="*90)

for c in range (1,10):            ##生成一维数据列9~1
    for d in range (9,c-1,-1):      ##生成一维数据行9~1
        print("{}*{}={:<5}".format(d,c,c*d),end='')
    print('')